package com.zlyx.easy.redis.supports;

import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;

import com.zlyx.easy.asyn.annotations.MsgCustomer;
import com.zlyx.easy.asyn.supports.AbstractMsgListener;
import com.zlyx.easy.redis.utils.RedisUtils;

/**
 * @Auth 赵光
 * @Describle
 * @2019年9月7日
 */
@MsgCustomer(channels = RedisUtils.DEFAULT_CHANNEL)
public class RedisMsgListener extends AbstractMsgListener implements MessageListener {

	@Override
	public void onMessage(Message message, byte[] pattern) {
		handleMsg(RedisUtils.deserialize(message.getBody()));
	}
}
